perm filename PUBT.PUB[206,LSP] blob sn#154825 filedate 1975-04-13 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00003 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	.DEVICE XGP
C00004 00003	.ss Conditional expressions.
C00008 ENDMK
C⊗;
.DEVICE XGP;
.EVENLEFTBORDER←ODDLEFTBORDER←1000;
.require "pubmac[206, NXL]" source_file
.standard front(I, 1)
.font 1 "basl30" <<text>>
.font 2 "bdr30" <<sym>>
.font 3 "basi30" <<var>>
.font 4 "basb30" <<bold>>
.font 5 "bdr30" <<const>>
.font 6 "sub"
.font 7 "sup"
.font A "fix40"
.font B "fix30"
.font C "grfx25"
.font D "grfx35"
.PAGE FRAME 53 HIGH 200 WIDE;
.AREA TEXT LINES 4 TO 51 CHARS 1 TO 200;
.TITLE AREA HEADING LINES 1 TO 3 CHARS 1 TO 81;
.TITLE AREA FOOTING LINE 52 CHARS 1 TO 81;
.PLACE TEXT;
.NARROW 0,200-81;
.INDENT 0,0,0;
.turn on "%#π" ;
.every heading(, {SECNAME}, {page}) ;
.AT 8 ⊂"%1        %*"⊃ ;
.AT 16 ⊂"%1                %*"⊃ ;
.ss Conditional expressions.

	When the form that represents a function depends on whether a
certain  predicate is true of the arguments, conditional expressions.
are used.  The conditional expression

	%4if %3p %4then %3a %4else %3b

%1is evaluated as follows:  First  %3p%1  is evaluated and determined to be
true or false.  If  %3p%1  is true, then  %3a%1  is evaluated and  its  value
is  the  value  of  the  expression.   If   %3p%1   is false, then  %3b%1  is
evaluated and its value is the value of the expression.  Note that if
%3p%1  is true,  %3b%1  is never evaluated, and if  %3p%1  is false, then  %3a%1  is
never evaluated.  The importance of this will be explained  later.  A
familiar  function that can be written conveniently using conditional
expressions is the absolute value of a real number.  We have

	%2|%3x%2| = %4if %3x%2<%50 %4then %2-%3x %4else %3x.

%1A more general form of conditional expression is

	%4if %3p %4then %3a %4else if %3q %4then %3b . . .  %4else if %3s %4then %3d %4else %3e.

%1There  can  be  any  number  of  terms;  the  value  is determined by
evaluating the propositional terms  %3p,  q%1, etc. until a true term  is
found;  the value is then that of the term following the next %4then%1.
If none of the propositional terms is true, then the value is that of
the term following the %4else%1.

	The function graphed in figure 4 is described by the equation

	%3tri%2[%3x%2] = %4if %3x%2<-%51 %4then %50 %4else if %3x%2<%50 %4then %51%2+%3x
%4else if %3x%2<%51 %4then %51%2-%3x %4else %50.
.CENTER
THIS IS FUCKED
.FILL
.PICTURE(D)
.NARROW 0,-1000


∞                                    ~
∞                                    ~
.OVERPRINT
                                   ≤'`≥(0,1)
∞                                    ~
                                 ≤'∞ ~∞ `≥
                               ≤'∞   ~∞   `≥
                             ≤'∞     ~∞     `≥
.OVERPRINT
                            '∞       ~∞       `
      ======================αααααααααααααααααα======================
∞                        (-1,0)      ~      (1,0)
∞                                    ~
∞                                    ~


                                Figure 4.
.WIDEN
.END
here we go round the mulberry bush, the mulberry bush, the mulberry bush
trying to figure out what to do about pub again
.center
that's all folks